import request from '/@/utils/request';

// 查询会员赠品列表
export function listGift(query?: Object) {
  return request({
    url: '/module/self/vip/gift/list',
    method: 'get',
    params: query
  })
}

// 查询会员赠品详细
export function getGift(id?: number) {
  return request({
    url: '/module/self/vip/gift/' + id,
    method: 'get'
  })
}

// 新增会员赠品
export function addGift(data?: Object) {
  return request({
    url: '/module/self/vip/gift',
    method: 'post',
    data: data
  })
}

// 修改会员赠品
export function updateGift(data?: Object) {
  return request({
    url: '/module/self/vip/gift',
    method: 'put',
    data: data
  })
}

// 删除会员赠品
export function delGift(id?: number) {
  return request({
    url: '/module/self/vip/gift/' + id,
    method: 'delete'
  })
}

// 导出会员赠品
export function exportGift(query?: Object) {
  return request({
    url: '/module/self/vip/gift/export',
    method: 'get',
    params: query
  })
}
